<template>
	<view class="classify-layout pageBg">
		<view class="classify">
			<ThemeItem 
				v-for="item in classifyList"
				:key="item._id"
				:item="item"
			>
			</ThemeItem>
		</view>
	</view>
</template>

<script setup>
import ThemeItem from '@/components/theme-item/theme-item';
import { ref } from 'vue';
import { apiGetClassify } from '@/api/api';
import { onReady } from "@dcloudio/uni-app";

// 专题精选图片
const classifyList = ref([])
const getClassify = async () => {
	let res = await apiGetClassify({
		// pageNum: 1,
		pageSize: 20,
	})
	classifyList.value = res.data
}

onReady(() => {
	getClassify()
})

</script>

<style lang="scss" scoped>
.classify-layout{
	
	.classify{
		padding: 30rpx;
		display: grid;
		gap: 15rpx;
		grid-template-columns: repeat(3, 1fr);
	}

}
</style>
